package cn.edu.nju.software.cdiy.action.user.login;

import cn.edu.nju.software.cdiy.bean.Scheme;
import cn.edu.nju.software.cdiy.service.SchemeService;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class BuySchemeAction extends ActionSupport {

	private SchemeService schemeService;
	private long id;
	private Scheme scheme;
	
	public void setSchemeService(SchemeService schemeService) {
		this.schemeService = schemeService;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Scheme getScheme() {
		return scheme;
	}

	@Override
	public String execute() throws Exception {
		scheme = schemeService.getSchemeById(id);
		return SUCCESS;
	}

}
